Understanding through Discussion

QuickSearch

 Welcome! You are not logged in. [ Login ] EvC Forum active members: 61 (9083 total)
 124 online now: evolujtion_noob, GDR, ooh-child, Phat, Taq, xongsmith (6 members, 118 visitors) Newest Member: evolujtion_noob Post Volume: Total: 897,196 Year: 8,308/6,534 Month: 1,377/1,124 Week: 146/430 Day: 22/60 Hour: 5/8

EvC Forum Side Orders Practice Makes Perfect

# Test for LaTeX dBCode

Author Topic:   Test for LaTeX dBCode
crashfrog
Member (Idle past 828 days)
Posts: 19762
From: Silver Spring, MD
Joined: 03-20-2003

 Message 31 of 35 (629454) 08-17-2011 9:02 PM Reply to: Message 18 by Percy10-20-2009 6:09 AM

Re: LaTeX More Powerful Than I Thought
As a matter of fact:
http://en.wikibooks.org/wiki/LaTeX
It's quite exhaustive; the parts you're probably interested in are about the math context.
http://en.wikibooks.org/wiki/LaTeX/Mathematics
Until you bumped this old topic I had no idea you could do LaTex in the new dbCode. Awesome! I learned LaTex two years ago so I could do calculus homework that looked like I was a real mathematician.

 This message is a reply to: Message 18 by Percy, posted 10-20-2009 6:09 AM Percy has seen this message but not replied

 Replies to this message: Message 32 by Admin, posted 08-18-2011 5:23 AM crashfrog has replied

Director
Posts: 12832
From: EvC Forum
Joined: 06-14-2002
Member Rating: 2.1

 Message 32 of 35 (629491) 08-18-2011 5:23 AM Reply to: Message 31 by crashfrog08-17-2011 9:02 PM

Re: LaTeX More Powerful Than I Thought
I implemented the Latex dBCode a couple years ago, but the recent translation to PHP evidently introduced a bug that I just discovered. The fetch of the image fails, so the code drops through to provide a link to a remote server, instead of creating a local image that it links to. The problem appears to be that the PHP file_get_contents routine cannot include a backslash in the file string, so I can't fetch a copy to store locally.
I included a link to some LaTeX documentation with the Latex Help, but do you think the WikiBooks doc is better?

 -- Percy EvC Forum Director

 This message is a reply to: Message 31 by crashfrog, posted 08-17-2011 9:02 PM crashfrog has replied

 Replies to this message: Message 33 by crashfrog, posted 08-18-2011 9:36 PM Admin has replied

crashfrog
Member (Idle past 828 days)
Posts: 19762
From: Silver Spring, MD
Joined: 03-20-2003

 Message 33 of 35 (629606) 08-18-2011 9:36 PM Reply to: Message 32 by Admin08-18-2011 5:23 AM

Re: LaTeX More Powerful Than I Thought
Yeah I think it's a bit more in-depth, and gives some better examples. I mostly use it to look up the various non-obvious math codes.
The problem appears to be that the PHP file_get_contents routine cannot include a backslash in the file string, so I can't fetch a copy to store locally.
Why do you need a backslash to get at a local file? Is it a Windows filesystem?

 This message is a reply to: Message 32 by Admin, posted 08-18-2011 5:23 AM Admin has replied

 Replies to this message: Message 34 by Admin, posted 08-18-2011 11:20 PM crashfrog has not replied

Director
Posts: 12832
From: EvC Forum
Joined: 06-14-2002
Member Rating: 2.1

 Message 34 of 35 (629610) 08-18-2011 11:20 PM Reply to: Message 33 by crashfrog08-18-2011 9:36 PM

Re: LaTeX More Powerful Than I Thought
crashfrog writes:
Why do you need a backslash to get at a local file?
I need to set the foreground color (the default is black): \color{White}
I prefix the foreground color to the equation supplied by the user between the latex codes.
I have a solution in mind and should have it completed and released in a day or two.

 -- Percy EvC Forum Director

 This message is a reply to: Message 33 by crashfrog, posted 08-18-2011 9:36 PM crashfrog has not replied

Director
Posts: 12832
From: EvC Forum
Joined: 06-14-2002
Member Rating: 2.1

 Message 35 of 35 (631244) 08-31-2011 4:45 AM

Latex Is Working
The Latex dBCode is working. It has been working, but it was a kluge to get around some unexpected PHP behavior. The new code is cleaner, and it also allows the default equation color to be set through the control panel. At present the equation color is set to white.
$\color{white} a=b$
To select some other color use the Latex color directive, e.g.:
[latex]\color{cyan}a=b[/latex]
It would look like this:
$\color{white} \color{cyan}a=b$
Legal Latex colors are:
White
Black
Red
Green
Blue
Cyan
Magenta
Yellow
This concludes this latex test.

 -- Percy EvC Forum Director

 Date format: mm-dd-yyyy Timezone: ET (US)