Multiple emphasized parts in a same line problem

9 views
Skip to first unread message

Jia-Yin

unread,
Sep 26, 2011, 8:09:36 PM9/26/11
to zena...@googlegroups.com
I got a problem yesterday. I want to emphasize multiple parts in a same line as follows.

If _n_ is odd, change _n_ to _3n+1_.

The output results do not emphasize all the terms "n" and "3n+1". Instead, it emphasize all the characters between the first "_ " and the last "_", that is, the part "_ is odd, change _n_ to _3n+1" is emphasized. The problem seems to happen for other modifiers like *, -, ...

How to solve this problem? Thank you.

Gaspard Bucher

unread,
Sep 27, 2011, 2:04:36 AM9/27/11
to zena...@googlegroups.com
I think this is a bug with the underlying textile parser for single character emphasis. You have two solutions here:

1. Use an insecable space (alt+space) before or after "n"

If _n _ is odd, change _n _ to _3n+1_.

2. Use Latex


Cheers,

Gaspard

--
_______________________________________________
zena mailing list
ze...@zenadmin.org
http://zenadmin.org/en/community



--

                                                               Gaspard

Jia-Yin

unread,
Sep 27, 2011, 11:49:36 AM9/27/11
to zena...@googlegroups.com
Thank you. I use the insecable space ( ) to solve the problem.

By the way, the LaTeX math tag seems broken for me at first. 
After some effort, I changed "&>" to ">" for the following lines in bricks/math/lib/bricks/math.rb.
        system("cd #{File.dirname(tempf.path)}; latex -interaction=batchmode #{"#{base}.tex".inspect} > '#{base}.err'")
        system("dvips #{tempf.path}.dvi -E -o #{base}.ps > '#{base}.err'") #||  Node.logger.error(File.read("#{base}.err"))
        system("convert -units PixelsPerInch -density 150 -matte -fuzz '10%' -transparent '#ffffff' #{base}.ps #{filepath.inspect} > '#{base}.err'") #||...

After that, the LaTeX math tag works for me. Did I miss something? Thank you.

Jia-Yin

Gaspard Bucher

unread,
Sep 27, 2011, 2:54:52 PM9/27/11
to zena...@googlegroups.com

--
_______________________________________________
zena mailing list
ze...@zenadmin.org
http://zenadmin.org/en/community

This is a strange bug... The "&>" option redirects stderr and stdout to a single file in bash [1]. Maybe this is not portable. What is your default shell ?

                                                               Gaspard

Jia-Yin

unread,
Sep 27, 2011, 8:04:38 PM9/27/11
to zena...@googlegroups.com, gas...@teti.ch
Yes, it is strange! I use Ubuntu 11.04 and its default shell. I think it should be bash. I tried again and still cannot work with "&>". After change it back to ">", the math shows again.

Jia-Yin

unread,
Sep 27, 2011, 8:08:09 PM9/27/11
to zena...@googlegroups.com, gas...@teti.ch
Sorry, the OS is Ubuntu 9.10 server. Not 11.04.

Gaspard Bucher

unread,
Sep 28, 2011, 2:21:07 AM9/28/11
to zena...@googlegroups.com

On Wed, Sep 28, 2011 at 2:08 AM, Jia-Yin <jywg...@gmail.com> wrote:
Sorry, the OS is Ubuntu 9.10 server. Not 11.04.

I will change the 'math' brick to use Open4 to fix this '&>' problem in the next minor release.

                                                               Gaspard

Reply all
Reply to author
Forward
0 new messages