Add how to make blockquotes in posts to the FAQ

  • Suggestion
  • Thread starter blaisem
  • Start date
In summary, the LaTex help page says to use the "linespacing" LaTex formatting, but it does not work on PF. The in-line formatting with double #: ##a_1^2+b_2^2## works, but the spacing before and after the equations remains dramatically pronounced. Between equations, you can use the LaTeX line break \\, no special alignment necessary.
  • #1
blaisem
28
2
In the LaTex help page:

https://www.physicsforums.com/help/latexhelp/

the 2nd section, "Delimiting your LaTex code," formats the LaTex equations into a blue box. An advantage of this box is that line spacing before, between, and after $$ delimiters is single-spaced. Otherwise, you end up with massive spacing like this:

$$ F=ma $$
$$ P=mv $$
$$ \hat H \Psi = - \frac{\hbar ^2}{2 \mu } \nabla^2 \Psi (r) + V(r) \Psi (r) = E \Psi (r) $$

For this reason, I would like to use this blue box, but I could not find anywhere how.

I initially attempted the {linespacing} LaTex formatting from its help site, but that doesn't seem to work on PF. I did however eventually find the spacing inbetween delimiters can be forced into single spacing via \begin{align}, although it requires the inconvenience of trial and error to arrange the proper alignment with "&"—not to mention the admittedly very mild annoyance of typing out the extra text. Nevertheless, the spacing before and after the equations remains dramatically pronounced. Example:

$$ \begin{align} F=ma \nonumber \\ p=mv \nonumber \\ \hat H \Psi = - \frac{\hbar ^2}{2 \mu } \nabla^2 \Psi (r) + V(r) \Psi (r) = E \Psi (r) \nonumber \end{align}$$

Also notice the necessity to trial and error the alignment with longer equations, making this work-around suboptimally tedious.

Personally, I prefer the aesthetic provided by the blue box in the help tutorial, where the spacing is more compact, and potentially more convenient to implement. Would it be possible to add how to do this somewhere in the FAQ? Or did I manage to miss it explained somewhere?
 
Physics news on Phys.org
  • #2
The code itself is the same. The forum adds one line break before and after these equations. To avoid that:
  • You can use the inline equations with double #: ##a_1^2+b_2^2##. To make them look more like the other style, add \displaystyle and center them. That leaves about the regular line spacing.
    ##\hat H \Psi = - \frac{\hbar ^2}{2 \mu } \nabla^2 \Psi (r) + V(r) \Psi (r) = E \Psi (r)##​
  • Between equations, you can use the LaTeX line break \\, no special alignment necessary: $$a^2=b^2\\c^2=e^2+f^2$$
 
  • Like
Likes blaisem
  • #3
blaisem said:
I would like to use this blue box
The "Help/How-To" articles use HTML tags for formatting. These do not work elsewhere in the forum. The blue box is a <p> tag with some inline CSS code:

<p style='margin-left: 10%; margin-right: 10%; background-color: Azure'>

If you're interested only in the single-spacing, I use the LaTeX line-break code // that mfb mentioned, in my ordinary posts. To avoid extra space before and after the entire block of equations, I put the code (with $$ delimiters) in-line inside a paragraph, with no extra newlines before and after the delimiters. You can see an example of this in one of my "blue boxes".
 
Last edited:
  • Like
Likes blaisem
  • #4
I see. I did not realize \\ was standard LaTex for a newline, nor that it was the actual reason the alignment formatting was singly spaced. That's also interesting double $ in a paragraph eliminates spacing before and after; I understood from the tutorial to only use double $ in a separate line since it's intended for stand-alone equations. It does seem easier than \displaystyle, although I may play around with both when the occasion arises.

I
will use these methods going forward. Thank you both for the help!
 
Last edited:
  • Like
Likes dlgoff

FAQ: Add how to make blockquotes in posts to the FAQ

1. What are blockquotes and how do I use them in my posts?

Blockquotes are a way to visually set apart a quoted section of text in a post. To use them, simply add the <blockquote> tag around the text you want to quote. You can also add a citation using the <cite> tag inside the blockquote.

2. Can I customize the appearance of blockquotes?

Yes, you can use CSS to style blockquotes to match the design of your website or blog. You can change the font, size, color, and alignment of the blockquote text, as well as the background color or image of the blockquote itself.

3. How do I create a blockquote with multiple paragraphs?

To create a blockquote with multiple paragraphs, simply add the <blockquote> tag around each paragraph you want to quote. They will automatically be formatted as one blockquote with multiple paragraphs.

4. Can I nest blockquotes within each other?

Yes, you can nest blockquotes within each other by adding multiple <blockquote> tags. However, it is best to avoid nesting too many levels deep, as it can become difficult to read and understand.

5. Are there any other tags I can use with blockquotes?

Yes, you can use the <footer> tag to add additional information or a source for the blockquote. You can also use the <aside> tag to add a sidebar or note related to the blockquote.

Similar threads

Replies
3
Views
806
Replies
7
Views
2K
Replies
4
Views
3K
Replies
1
Views
930
Replies
1
Views
2K
Replies
15
Views
4K
Replies
2
Views
2K
Replies
2
Views
3K
Back
Top