Pasting LATEX Content from LyX Editor to Forum Posts

  • LaTeX
  • Thread starter vijay_singh
  • Start date
  • Tags
    Forum Latex
In summary, you can copy LaTeX content from the editor to forum posts by putting the content between [tex] and [/tex] tags, without the spaces inside the square brackets.
  • #1
vijay_singh
28
0
Hi

I am first time user of LATEX. I have LyX editor where I am able to create LATEX documents. But I couldn't find any clear solution for pasting that LATEX content into my posts in the forum. Is there any simple way to copy LATEX document from the editor to forum posts?
 
Physics news on Phys.org
  • #2
You can put latex code in between [ tex ] and [ /tex] tags (without the spaces inside the square brackets):

i.e. [tex]y=7x[/tex]
 
  • #3
[noparse]

cristo said:
You can put latex code in between [ tex ] and [ /tex] tags (without the spaces inside the square brackets)

Hi cristo! :smile:

You can type [noparse][tex] and [/tex] (without any spaces!) by surrounding them with [noparse] and [/noparse][/noparse]. :smile:
 
  • #4
here's a perl script that turns valid LaTeX files* into forum LaTeX.

This script comes with no warranties, etc. If you hose your machine that's your fault.

usage: save file to script.pl, chmod it to executable, then do ./script.pl file

#!/usr/bin/perl -i
$_=@ARGV[0];
while(<>){
s/\$\$([^\$]*)\$\$/\[tex\]$1\[\/tex\]/g;
s/\$([^\$]*)\$/\[itex\]$1\[\/itex\]/g;
print;
}* this assumes that you use $ $ to denote inline LaTeX and $$ $$ for display math. Although the usage of $$ $$ should be discouraged (in favour of \[ \]) I chose to do it this way for no good reason. Change the regexps if you want.
 
  • #5
Just testing

[tex] $ V_{bw} $ = $ V_{b} $ - $ V_{w} $ [/tex]

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.
 
  • #6
vijay_singh said:
Just testing

[tex] $ V_{bw} $ = $ V_{b} $ - $ V_{w} $ [/tex]

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.

Hi vijay! :smile:

I've copied what you typed, and left out the spaces and dollars, and it works fine:

[tex] V_{bw}=V_{b}-V_{w} [/tex]

Click "QUOTE" to see what I typed.

(and generally click "QUOTE" to see other people's LaTeX typing, and just steal it! :smile:)
 
  • #7
vijay_singh said:
What do you people use to generate latex source.

I only use Latex in here, and either type it in by hand or use the menu available when you click the "Go Advanced" button under the Quick Reply window.

Click the capital Sigma icon in advanced mode to get the Latex menu. Unfortunately, this feature is not enabled in every sub-forum (like this one). Not sure why that is.
 
  • #8
I use Texmaker as IDE (Interactive developmend environment), you must know the language of TeX to use it.
 
  • #9
vijay_singh said:
Just testing

[tex] $ V_{bw} $ = $ V_{b} $ - $ V_{w} $ [/tex]

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.

You don't put the dollar signs in. They're the things that would tell the LaTeX program to interpret the contained text as mathematics if you were compiling the source on your machine at home. That isn't what happens in the forum. In this forum's implementation the $ and $$ are are replaced by the tex and itex tags.
 

1. How do I copy and paste LATEX content from the LyX editor to a forum post?

To copy and paste LATEX content from the LyX editor to a forum post, you can follow these steps:

  1. Select the desired content in the LyX editor.
  2. Right-click on the selected content and choose "Copy as LATEX".
  3. Paste the copied content into the forum post.

2. Can I directly paste LATEX code into a forum post without using the LyX editor?

Yes, you can directly paste LATEX code into a forum post without using the LyX editor. However, it is recommended to use the LyX editor as it provides a more user-friendly interface and makes it easier to edit the code if needed.

3. What is the advantage of using the LyX editor for LATEX content?

The LyX editor offers a WYSIWYM (What You See Is What You Mean) approach to writing LATEX code. This means that you can see the final result as you type, without having to worry about the underlying code. It also provides various tools and features to make writing LATEX easier and more efficient.

4. Can I preview my LATEX content before posting it on the forum?

Yes, you can preview your LATEX content before posting it on the forum. The LyX editor has a built-in preview feature that allows you to see how your content will look like when posted. This can help you identify any errors or formatting issues before sharing your content.

5. How can I ensure that my LATEX content appears correctly on the forum post?

To ensure that your LATEX content appears correctly on the forum post, make sure to use the proper syntax and formatting. It is also important to use a LATEX-to-HTML converter if the forum does not support LATEX directly. Additionally, previewing your content before posting can help you identify any issues and make necessary edits.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
949
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
956
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top