Jump to content

LaTex question

Featured Replies

I'm sure this question will sound incredibly stupid to some, but until now, I've handwritten my assignments. I've started using LaTex, and I've already nearly finished an assignment, which looks fine, but...

 

How do you insert breaks between sentences in LaTex e.g

 

To determine the solution of <equation here>, we proceed as follows...

 

<equation>

 

<equation>

 

I'm using MikTex, and the TeXnic center platform...however I keep using the \begin{flushleft} command to create a space between my equations...which isn't right. I've searched through the basic tutorials, and I can't find a basic command.

Edited by Snail

I do not understand what you are looking for. Since you gave an example of what you want it to look like, perhaps you should also state what it currently actually does look like. That would probably help understanding your question.

  • Author
I do not understand what you are looking for. Since you gave an example of what you want it to look like, perhaps you should also state what it currently actually does look like. That would probably help understanding your question.

 

Unfortunately, the only example I have, is the answer to an assignment question, which I can't post online.

 

It looks, as I want it to look, that isn't the problem. The problem is, I want a simple command to seperate my equations, i.e how it looks on here if I'd press 'return'...

 

\documentclass[10pt]{article}

\begin{document}

\section*{Question 1 (b)}

\boldmath

To determine the implicit solution of...$nothing to see here$ we proceed as follows.

\begin{flushleft}

For the left hand side...

\begin{flushleft}

$nothing to see here also$ so...

\begin{flushleft}

$more nothing to see here$

So the implicit solution is $no answer here, go learn some math$

\end{document}

 

The '\begin{flushleft}' command separates the equations, but this clearly isn't the right command i.e it throws out an \end(flushleft} command through TeXnic. It's just irritating, and I want to construct some templates for my assignments. Hope that makes sense.

Edited by Snail

I was almost thinking usage of $ might be the problem but it just did not fit to the fact that no tutorial said anything about it. Anyways

 

\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
\section*{Version 1 - The wanted newlines}
\boldmath
To determine the implicit solution of...$nothing to see here$ we proceed as follows.
For the left hand side... \\
$nothing to see here also$ so... \\
$more nothing to see here$ \\
So the implicit solution is $no answer here, go learn some math$

\section*{Proper math}
A simple equation or -as in this case- two subsequent simple equations
are usually written in an equation-environment:
\begin{equation}
a=b
\end{equation}
\begin{equation}
c=d
\end{equation}

The equationarray-environment is useful very often, too:
\begin{eqnarray}
E &=& \frac{p^2}{2m} \\
&=&
\frac 12 mv^2
\end{eqnarray}
\end{document}

  • Author

Got it, I didn't realise that equations had a separate method of ummm separation. I've copied and pasted the commands into my current template...thanks both :)

  • 4 weeks later...
  • Author

Another question, which I'm struggling to find an answer to. This might be TeXnic specific, but when I embed a jpeg into a document, it displays the path of the image on top, and it looks ugly.

 

I'm not sure if Mathcad supports postscript for images, so that might be one solution. However the former method is very convenient, click on an icon, import image and it gives you a few options like size et.c I'm at work at the moment, but I'll supply the code if needed.

You should definitely supply your TeX-code. Haven't you learned from last time? As TeXnicCenter is just a text editor, displaying the path is most probably not related to that. I've never had the path being displayed when embedding plots. My first guess is that you possibly do something like

\begin{figure}
\caption{NameOfTheJPGEG}
\includegraphics{NameOfTheJPGEG}
\end{figure}

i.e. you explicitly put the filename as description of the figure.

  • Author
You should definitely supply your TeX-code. Haven't you learned from last time?

 

Like I said I was at work, and I posted on the off chance. That aside, here's the Tex-code.

 

\begin{figure}[h]
   \centering
       \includegraphics[width=0.80\textwidth]{C:/Documents and Settings/Snail/My Documents/My Pictures/Example.jpg}
   \label{Here's an example}
\end{figure}

 

As TeXnicCenter is just a text editor, displaying the path is most probably not related to that. I've never had the path being displayed when embedding plots. My first guess is that you possibly do something like

 

Ok, thanks, I've fiddled around with my example, but to no avail...it's still showing the path at the top of the image.

I cannot reproduce your problem.

\documentclass[12pt]{article} 
\pagestyle{empty}
\usepackage{graphicx}

\begin{document}
Below, we see a picture of Snail:
\begin{figure}[h!]
 \centering
 \includegraphics[width=0.80\textwidth]{SnailsAvatar.jpg}
\end{figure}

It was not possible to find out what the picture is
supposed to represent.
\end{document}

Then

pdflatex Snail.tex

Results in the pdf attached.

 

I do remember having had a lot of trouble with pictures myself, though. For example, I cannot compile the source above using "latex" as command but only with "pdflatex". Perhaps you should try a different destination file format and see if the issue with the pathname prevails. Sidenote: I somehow overread the "at work" part so sry about that. Didn't mean to actually be rude in either case.

Snail.pdf

  • Author
Sidenote: I somehow overread the "at work" part so sry about that. Didn't mean to actually be rude in either case.

 

No problem at all, and I really appreciate the help. I'll try a different file format to see if I get the same result.

Perhaps you should also try to compile my example (copy&past, replace the filename with any jpeg on your HD) and see if you still have the same problem (i.e. a different output than the pdf I attached).

  • Author
Perhaps you should also try to compile my example (copy&past, replace the filename with any jpeg on your HD) and see if you still have the same problem (i.e. a different output than the pdf I attached).

 

Odd, same problem, this was through DVI output, the path is now showing twice for some reason. I'll have a hunt around, IIRC there's a dedicated forum at my Uni for LaTex, I'll send a link to this thread, and see if I get any feedback.


Merged post follows:

Consecutive posts merged

Annoyingly simple, here's the code...

 

\documentclass[12pt]{article} 
\pagestyle{empty}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h!]
\includegraphics[width=0.80\textwidth]{"C:/Documents and Settings/Snail/My Documents/My Pictures/Snail".jpg}
\end{figure}
\end{document}

 

Quote tags around the path, but not the extension.

Edited by Snail
Consecutive posts merged.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.