all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to force markup without spaces
@ 2012-11-19  5:32 cinsky
  2012-11-19  7:11 ` Vladimir Lomov
  0 siblings, 1 reply; 30+ messages in thread
From: cinsky @ 2012-11-19  5:32 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

AFAIK, if the markup syntax (=code=, *bold*, ..) is directly followed
by non-whitespace characters, then it will not be marked-up:

   =hello=there
   /not/italic

This may be right decision on English text, but in some languages, the
postposition (grammar) will be postfixed without spaces into the
previous noun, so it will be the trouble.  (Following text contains
Korean characters in UTF-8, you may need additional korean font to
read properly)

   =printf=는
   =bold=로
   =철수=는

I'm sure that some other languages will have same problem
(e.g. Japanese or Chinese).

Is there any way to force mark-up on this situation?

If this pattern cannot be implemented easily, how about to introduce
new escaping character to prevent to insert whitespace between
marked-up text and the following postfix text?  For example:

  =printf=\is      => rendered in HTML: <code>printf</code>is
  *bold*\asdf      => rendered in HTML: <b>bold</b>asdf
  /철수/\는        => rendered in HTML: <i>철수</i>는

I can't say the above solution is well-designed, but I'm sure that
you'll get the point.

Thanks.

-- 
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://www.cinsk.org/cfaqs/

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: How to force markup without spaces
@ 2022-07-26 10:24 K
  0 siblings, 0 replies; 30+ messages in thread
From: K @ 2022-07-26 10:24 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

On Tue, 2022-07-26 at 13:30 +0700, Max Nikulin wrote:

> I have not tested it, but I expect you can use
> - export filter that removes zero-width spaces at the last export
> stage.
> I assume that your documents do not contain them besides markup
> workaround
> - #+latex_header: \DeclareUnicodeCharacter{200B}{}
> - custom link
> 
>     #+begin_src elisp :results none :exports both
>       (org-link-set-parameters
>        "sep"
>        :export (lambda (path desc backend)
>                (if (org-export-derived-backend-p backend 'org)
>                    (org-link-make-string (concat "sep:" path) desc)
>                  (or desc ""))))
>     #+end_src
>     "中文[[sep:][*测*]]试"

I tested the second workaround, and replaced the \DeclareUnicodeCharacter{200B}{} sequence with \newunicodechar{​}{} sequence since I am using xelatex, which does not support the former.
It works fine so far.

> In other thread we are discussing advantages and problems of
> switching
> from PdfLaTeX to LuaLaTeX for non-latin scripts. The latter is a
> Unicode
> engine. I am curious what is your opinion from standpoint of Chinese
> language, namely amount of required customization in both cases. I
> think, it is better to either start a dedicated thread, or find the
> part
> of discussion related to fonts and babel (LaTeX package) setup.

As far as I know, Chinese users commonly use ctex package https://ctan.org/pkg/ctex to handle Chinese typesetting problem, and they prefer xelatex and lualatex over pdflatex. They don't support more fonts when using pdflatex, compared with using xelatex etc. (you can see that on page 7 of their pdf document). So I just use xelatex and don't have much experience using pdflatex.

When using ctex, you just need to declare \documentclass{ctexart} (ctexart is a ctex version article) to use Chinese characters. Then if your system has the required default fonts, the pdf documents should be OK.


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-07-30 15:45 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19  5:32 How to force markup without spaces cinsky
2012-11-19  7:11 ` Vladimir Lomov
2012-11-19 10:06   ` Seong-Kook Shin
2012-11-19 14:40     ` Suvayu Ali
2012-12-13 21:26       ` Bastien
2022-07-25 17:50         ` K
2022-07-25 18:27         ` K
2022-07-25 19:02           ` K
2022-07-26  1:26             ` Ihor Radchenko
2022-07-26  2:23               ` Max Nikulin
2022-07-26  4:26                 ` K K
2022-07-26  6:30                   ` Max Nikulin
2022-07-26 12:59                   ` [PATCH] org-export: Remove zero-width space escapes during export Ihor Radchenko
2022-07-26 14:25                     ` Timothy
2022-07-26 15:27                       ` András Simonyi
2022-07-26 16:38                     ` Max Nikulin
2022-07-27  3:30                     ` Max Nikulin
2022-07-28 13:17                     ` [PATCH] Add new entity \-- serving as markup separator/escape symbol Ihor Radchenko
2022-07-28 15:34                       ` Max Nikulin
2022-07-29  1:43                         ` Ihor Radchenko
2022-07-29  2:50                           ` Max Nikulin
2022-07-29  9:06                             ` [PATCH v2] " Ihor Radchenko
2022-07-30  0:22                               ` Samuel Wales
2022-07-30  4:12                                 ` Samuel Wales
2022-07-30  6:49                                 ` Ihor Radchenko
2022-07-30 15:44                                   ` Max Nikulin
2022-07-28 22:20                       ` [PATCH] " Tim Cross
2022-07-29  0:32                       ` Juan Manuel Macías
2022-07-29  5:49                       ` tomas
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 10:24 How to force markup without spaces K

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.