Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Quick problem with Latex

  1. Mar 10, 2006 #1

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    Hey

    I'm wanting to write up a small paper so I've installed various Latex things on my computer, I have the full Miktex package and I have TexnicCenter, I want to write something like:

    [tex]\text{For all x, y} \, \in \mathbb{N}[/tex]

    But the mathbb bit doesn't seem to be working, I can get mathrm and mathbf, but these aren't the fonts I want, can anyone help me please.
     
  2. jcsd
  3. Mar 10, 2006 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    make sure you've got

    \usepackage{amssymb}

    in the preamble, and plenty of other pckages.

    google to find out which package provides mathbb ot make sure i've got it right.
     
  4. Mar 13, 2006 #3
    You could use Open Office Maths. Its quick, easy and free. http://www.openoffice.org/
     
  5. Mar 13, 2006 #4

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    But quite painful to do full maths papers, I've found it useful to do maths homework but anything like papers or coursework it just doesn't have the functionality for.

    Plus it doesn't actually have all the symbols I require most the time and I end up depending on Mathematica fonts.

    Anyway thanks matt, I think I've about worked it out but I spotted a mistake in my proof so I've been trying quite desperately to patch it up.
     
  6. Mar 13, 2006 #5
    Hey Zurtex, you can try http://www.dessci.com/en/products/mathtype/
    MathType is quiet easy to learn and
    has several advanced functions.

    Mathtype can convert to [tex]\LaTeX[/tex], MathML,...or you can just inline your equations as simple images. It is compatible with Microsoft Word, and you can later distill your documents into PDF files.
     
  7. Mar 14, 2006 #6
    As a bit of inspiration, here are an old .sty file and a template i used some time ago. place both files quoted below in the same directory and compile. works fine with my MikTeX (do note that not all enviroments in the style file work!, but the template compiles fine).


    First here is "projects.sty":
    Code (Text):

    %------------------------------------------------------------------------------
    % Contents: Commands, package loading and page settings
    % Id: projects.sty
    %------------------------------------------------------------------------------
    % By Bo Lind
    %------------------------------------------------------------------------------
    \ProvidesPackage{projects}

    %--------------------------------------------------------
    % Page setup and page style
    %--------------------------------------------------------
    \setlrmarginsandblock{1.5in}{0.8in}{*} % Sets the inner and outer margins
    \setulmarginsandblock{1in}{1.3in}{*} % Sets the top and bottom margins
    %\setmarginnotes{0.2in}{1.7in}{0.3in}

    \checkandfixthelayout

    \setlength{\droptitle}{3cm} % Sets the length before the title
    \aliaspagestyle{title}{empty} % no page number on the front page

    \newcommand{\published}[1]{
      \gdef\puB{#1}
    }
    \newcommand{\puB}{}
    \renewcommand{\maketitlehookd}{
      \vskip 30em
      \begin{center}
        \puB
      \end{center}
    }
    \newcommand{\subtitle}[1]{
      \gdef\suB{#1}
    }
    \newcommand{\suB}{}
    \renewcommand{\maketitlehookb}{
      \begin{center}
        \LARGE\scshape\suB
      \end{center}
    }

    \pretitle{\begin{center}\Huge\bfseries}
    \posttitle{\par\end{center}\vskip 0.5em}
    \preauthor{\begin{center}
        \large\bfseries \vskip 8em%
        \begin{tabular}[t]{c}}
    \postauthor{\end{tabular}\end{center}}
    \predate{\begin{center}\large}
    \postdate{\par\end{center}}

    \cftsetindents{chapter}{1.5em}{6.0em}
    %\cftsetindents{subsection}{5.5em}{6.0em}
    \renewcommand{\cftchapterleader}{}
    \renewcommand{\cftchapterpresnum}{\chaptername\ }

    \maxsecnumdepth{subsection}
    \setsecnumdepth{subsection}
    \maxtocdepth{subsection}

    \captiondelim{. }
    \captionnamefont{\small\scshape}
    \captiontitlefont{\small}

    %\tightlists % suppress space between list entries

    \pagestyle{plain}
    \renewcommand{\baselinestretch}{1.1} % 1.1 line-distance

    \usepackage[danish]{varioref} % More inteligent refrences.
    \usepackage[round]{natbib} % Use author-date citation.

    %--------------------------------------------------------
    % Fonts and layout
    %--------------------------------------------------------

    \usepackage[latin1]{inputenc} % Input encoding. Makes it possible to type special characters.
    \usepackage[danish]{babel} % Danish hyphenation and changes Figures, Chapter etc to Danish.
    \usepackage{lmodern} % Makes the Latin Modern fonts the default for LaTeX.
    \usepackage[T1]{fontenc} % Standard font encoding.
    \usepackage{textcomp} % TS1-encoding symbols.

    \usepackage{amssymb}
    \usepackage{amsfonts} % Better math fonts.
    \usepackage{amsmath} % Provides various features to facilitate writing math formulas and to improve the typographical quality of their output.

    \usepackage{bm} % Blackboard Bold font.

    \usepackage{url}
    \usepackage{units} % To typeset units use the command \unit{m^2}.

    %--------------------------------------------------------
    % Enviroments, theorems etc.
    %--------------------------------------------------------

    \usepackage[amsmath,thmmarks]{ntheorem}


    \theoremstyle{plain}
    \theoremheaderfont{\normalfont\bfseries}
    \theorembodyfont{\itshape}
    \newtheorem{thm}{Sætning}[chapter]
    \newtheorem{lem}[thm]{Lemma}
    \newtheorem{kor}[thm]{Korollar}
    \newtheorem{eks}[thm]{Eksempel}

    \theorembodyfont{\normalfont}
    \newtheorem{defn}[thm]{Definition}
    \newtheorem{exerc}{\O{}velse}[chapter]

    \theoremstyle{nonumberplain}
    \theoremheaderfont{\normalsize\normalfont\scshape}
    \theorembodyfont{\upshape}
    \theoremsymbol{\rule{1ex}{1ex}}
    \newtheorem{proof}{Bevis}

    \newcommand{\refthm}[1]{S\ae{}tning~\ref{#1}}
    \newcommand{\reflemma}[1]{Lemma~\ref{#1}}
    \newcommand{\refcor}[1]{Korollar~\ref{#1}}
    \newcommand{\refdefn}[1]{Definition~\ref{#1}}
    \newcommand{\refexerc}[1]{\O{}velse~\ref{#1}}
    \newcommand{\refexample}[1]{Eksempel~\ref{#1}}

    %--------------------------------------------------------
    % Useful commands
    %------------------------------------------------------------------------- Misc

    \newcommand{\itemMath}[1]{\raisebox{-\abovedisplayshortskip}{%
     \parbox{0.75\linewidth}{%
     \[#1\]}}}


    %---------------------------------------------------------- Figure preferences:
    % The following four numbers are to make TeX more likely to put figures on the
    % same page rather than on a separate figures page. Can tinker with these, but
    % make sure floatpagefraction<topfraction.
    % Values recommended by the web page I found were 0.15, 0.85, 0.65, 0.60. The
    % default values are 0.2, 0.7, 0.3, 0.5
    %\renewcommand{\textfraction}{0.2}
    %\renewcommand{\topfraction}{0.7}
    %\renewcommand{\bottomfraction}{0.3}
    %\renewcommand{\floatpagefraction}{0.5}
    %---------------------------------------------------------------------- Figures
    \newcommand\tabcaption{\def\@captype{table}\caption}
    \newcommand\figcaption{\def\@captype{figure}\caption}

    \usepackage[dvips]{graphicx}
    \usepackage{sidecap}
    \usepackage{psfrag}

    \newlength{\marginwidth} % Let a length to use for margin figures
    \setlength{\marginwidth}{\marginparwidth}
    \addtolength{\marginwidth}{\marginparsep}

    % \begin{adjustwidth*}{0in}{-\marginwidth} ... \end{adjustwidth*} needs to be
    % placed OUTSIDE the table enviroment to work, while it can be placed INSIDE
    % in the figure enviroment. (In memoir).

    \newcommand{\fig}[3]{ %\fig{filename}{caption}{optional commands}
      \begin{figure}[htbp]
        #3
        \center
        \includegraphics{#1}
        \figcaption{#2} %
        \label{fig:#1} %
      \end{figure}
    }

    \newcommand{\sidefig}[3]{ %\sigfig{filename}{caption}{optional commands}
      \begin{SCfigure}[][htbp]
        #3
        \includegraphics[width=0.5\textwidth]{#1}
        \caption{#2} %
        \label{fig:#1} %
      \end{SCfigure}
    }

    %---------------------------------------------------------------------- Physics

    \newcommand{\Hamiltonian}{\mathcal{H}}
    \newcommand{\Lagrangian}{\mathcal{L}}
    \newcommand{\mean}[1]{\langle #1 \rangle}

    %------------------------------------------------------------------------- Sets
    \newcommand{\N}{\mathbb{N}}
    \newcommand{\Z}{\mathbb{Z}}
    \newcommand{\Q}{\mathbb{Q}}
    \newcommand{\R}{\mathbb{R}}
    \newcommand{\C}{\mathbb{C}}

    \newcommand{\emtyset}{\varnothing}

    \newcommand{\set}[1]{\ensuremath{\{#1\}}}
    \newcommand{\suchthat}{\bigm|}
    \newcommand{\union}{\cup}
    \newcommand{\Union}{\bigcup}
    \newcommand{\intersection}{\cap}
    \newcommand{\Intersection}{\bigcap}

    % Other set commands:
    % \complement
    % \setminus
    % \in

    \newcommand{\map}[3]{\ensuremath{#1\colon #2\to #3}}

    %---------------------------------------------------------------------- Vectors
    \renewcommand{\vec}[1]{\bm{\mathrm{#1}}}
    \newcommand{\uvec}[1]{\vec{e}_{#1}}

    \newcommand{\ket}[1]{\, |#1\rangle}
    \newcommand{\bra}[1]{\langle #1 |\,}

    \newcommand{\rr}{\vec{r}}
    \newcommand{\vv}{\vec{v}}
    \newcommand{\aaa}{\vec{a}}

    \newcommand{\zero}{\ensuremath{\mathbf{0}}}

    %------------------------------------------------------------------ Derivatives
    \newcommand{\D}[2]{\frac{d #1}{d #2}}
    \newcommand{\DD}[2]{\frac{d^2 #1}{d #2^2}}
    \newcommand{\PD}[2]{\frac{\partial #1}{\partial #2}}
    \newcommand{\PDD}[2]{\frac{\partial^2 #1}{\partial #2^2}}

    %-------------------------------------------------------------------- Integrals
    \newcommand{\oiint}{\int\hspace{-2ex}\int\hspace{-3.04ex}\bigcirc~}
    \renewcommand{\iint}{\int\hspace{-1.5ex}\int}
    \renewcommand{\iiint}{\int\hspace{-1.5ex}\int\hspace{-1.5ex}\int}

     
    here is template.tex
    Code (Text):

    \documentclass[a4paper,10pt,twoside,article]{memoir}

    \usepackage{projects}

    \title{Title of the project}
    \subtitle{Subtitle}
    \author{xxxxx xxxxxx \textnormal{, \textsc{cpr no. xxxxxx}}}
    \date{\today}
    \published{Fysisk Institut, Syddansk Universitet}
    %\published{Physics Department\\ University of Southern Denmark}

    %--------------------------------------------------------------\begin{document}
    \begin{document}
    \frontmatter

    \maketitle
    \newpage

    %\tableofcontents*
    %\listoffigures*
    %\listoftables*
    %\newpage

    %\begin{abstract}
    %  Max en side der sammenfatter, hvad rapporten handler om og hvilke konklusioner, der drages i rapporten
    %\end{abstract}
    %\newpage

    \mainmatter
    %------------------------------------------------------------chapter:Indledning
    \chapter{Indledning}\label{cha:indledning}

    \[
    \forall x,y\in\N
    \]

    \appendix


    \bibliography{mybiblio}
    \bibliographystyle{plainnat}

    %In \cite{qriffiths:quantum} ...

    \end{document}

     
     
  8. Mar 16, 2006 #7

    Zurtex

    User Avatar
    Science Advisor
    Homework Helper

    Same problem with Mathtype as I have with open office, just doesn't work for writting lots of stuff. Mathtype is even worse really because of its wysiwyg interface.

    Thanks Triss, I'll try it out :smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Quick problem with Latex
  1. LaTeX problem (Replies: 8)

  2. Quick latex question (Replies: 2)

  3. Problems with LaTeX (Replies: 4)

  4. Quick LaTeX question (Replies: 3)

Loading...