Problem with links to the library


by sylas
Tags: autolink
sylas
sylas is offline
#1
Dec29-09, 07:41 PM
Sci Advisor
sylas's Avatar
P: 1,750
Make sure that you have library autolinks enabled, and then have a look at msg #1 of thread "Estimating the impact of CO2 on global mean temperature"; in particular the LaTeX equation near the top, with the heading "The short form".

Here's what I see at present:
Click image for larger version

Name:	AutolinkBug.JPG
Views:	7
Size:	249.9 KB
ID:	22774

There's a lot of weird looking code sitting just above the table. I've looked at the html source, and the problem is that the LaTeX is an attempt to give a table, which includes as text the word "flux". The autolink system is adding an autolink to the library entry to the popup LaTeX code that goes with the image. This causes odd problems with quoting strings.

I'll see if I can reproduce the problem here:

Using the word flux:
[tex]\textrm{the flux is} \; 10 \; W/m^2[/tex]
Using the word flow:
[tex]\textrm{the flow is} \; 10 \; W/m^2[/tex]
Cheers -- sylas
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
tiny-tim
tiny-tim is offline
#2
Dec30-09, 03:27 AM
Sci Advisor
HW Helper
Thanks
tiny-tim's Avatar
P: 26,167
Quote Quote by sylas View Post
… There's a lot of weird looking code sitting just above the table. I've looked at the html source, and the problem is that the LaTeX is an attempt to give a table, which includes as text the word "flux". The autolink system is adding an autolink to the library entry to the popup LaTeX code that goes with the image. This causes odd problems with quoting strings. …
Hi Sylas!

There's two ways of fixing it …
i] close the \textrm (btw, you can just type "\text" in PF ) either immediately before "flux" (being careful to include the space before you close), or immediately after it, and reopen … that eliminates the space before, or after, "flux", so the autolink (which needs a space before and after) isn't activated

ii] gratuitously use " flux " before you get to the LaTeX … autolinking only works on the first appearance in each post.
Here's two copies of your table, the first with the extra "\text", showing (I hope! ) no autolinking, and the second exactly as you posted it …
[tex]\begin{array}{lcll}
\textrm{Energy balance} & \approx 239 & W/m^2 & \textrm{(energy }\text{flux to, and from, space)} \\
\textrm{CO2 forcing} & 3.7 & W/m^2/2xCO_2 & \textrm{(change to balance per doubling)} \\
\textrm{Current CO2 increase} & 2 & ppm/year \\
\textrm{Current 2xCO2 per year} & \log_2(1+2/385) = 0.0075 & 2xCO_2 / year & \textrm{(using 385ppm for current levels)} \\
\textrm{Climate sensitivity} & 3 \pm 1.5 & K/2xCO_2 & \textrm{(Temperature response for forcings, to restore balance)} \\
\textrm{Temperature impact of CO2} & 0.022 \pm 0.011 & K/year & \textrm{Estimated contribution of CO2 to current warming trends}\end{array}[/tex]

[tex]\begin{array}{lcll}
\textrm{Energy balance} & \approx 239 & W/m^2 & \textrm{(energy flux to, and from, space)} \\
\textrm{CO2 forcing} & 3.7 & W/m^2/2xCO_2 & \textrm{(change to balance per doubling)} \\
\textrm{Current CO2 increase} & 2 & ppm/year \\
\textrm{Current 2xCO2 per year} & \log_2(1+2/385) = 0.0075 & 2xCO_2 / year & \textrm{(using 385ppm for current levels)} \\
\textrm{Climate sensitivity} & 3 \pm 1.5 & K/2xCO_2 & \textrm{(Temperature response for forcings, to restore balance)} \\
\textrm{Temperature impact of CO2} & 0.022 \pm 0.011 & K/year & \textrm{Estimated contribution of CO2 to current warming trends}\end{array}[/tex]
EDIT: Cool, it worked!
sylas
sylas is offline
#3
Dec30-09, 04:18 AM
Sci Advisor
sylas's Avatar
P: 1,750
Thanks... that will work. I'll ask someone to fix it for me in the post.

If it is easy to fix, it may be worth altering the autolinking code to check that it is not munging html.... something for chroot in his no doubt copious free time.

Cheers -- sylas

cristo
cristo is offline
#4
Dec30-09, 04:25 AM
Mentor
cristo's Avatar
P: 8,287

Problem with links to the library


Quote Quote by sylas View Post
Thanks... that will work. I'll ask someone to fix it for me in the post.
Done.
sylas
sylas is offline
#5
Dec30-09, 04:40 AM
Sci Advisor
sylas's Avatar
P: 1,750
Quote Quote by cristo View Post
Done.
Wow. That was quick. Ta muchly!


Register to reply

Related Discussions
Links? Introductory Physics Homework 0
Useful links. General Discussion 12