How can I open a .tex file? [closed]
Asked Answered
C

3

24

I'm trying to open a .tex file.

I'm not sure I've got to the bottom of the (possibly) surprisingly complex process. I was told I could do it with Notepad++, which I proceeded to download. Here is the result:

%sample file for Modelica 2011 Conference paper

\documentclass[11pt,a4paper,twocolumn]{article}
\usepackage{graphicx}
% uncomment according to your operating system:
% ------------------------------------------------
\usepackage[latin1]{inputenc}    %% european characters can be used (Windows, old Linux)
%\usepackage[utf8]{inputenc}     %% european characters can be used (Linux)
%\usepackage[applemac]{inputenc} %% european characters can be used (Mac OS)
% ------------------------------------------------
\usepackage[T1]{fontenc}   %% get hyphenation and accented letters right
\usepackage{mathptmx}      %% use fitting times fonts also in formulas
% do not change these lines:
\pagestyle{empty}                %% no page numbers!
\usepackage{geometry}            %% please don't change geometry settings!
\geometry{left=20mm, right=20mm, top=25mm, bottom=25mm, noheadfoot}


% begin the document
\begin{document}
\thispagestyle{empty}

\title{\textbf{Implementation of a Modelica Library\\
  for Simulation of Refrigeration Systems}}
\author{Torge Pfafferott \quad Gerhard Schmitz\\
Technical University Hamburg-Harburg, Department of Technical Thermodynamics\\
Denickestr. 17, 21075 Hamburg}
\date{} % <--- leave date empty
\maketitle\thispagestyle{empty} %% <-- you need this for the first page

\abstract{
The physical modelling and transient simulation of
refrigeration systems can be useful within the specification,
development, integration and optimisation.
Therefore, a model library for vapour compression cycles has been implemented.
The library is based on the free Modelica library ThermoFluid and contains basic correlations for
heat and mass transfer and pressure drop, partial components for control volumes and
flow resistances and advanced ready-to-use models for all relevant
components of refrigeration systems like pipes, heat exchangers,
compressor, expansion devices and accumulator.
}

\emph{Keywords: refrigeration; compression cycle; simulation; thermofluid; CO2; R134a}

\section{Introduction}

The modeling and simulation of refrigeration systems is of interest 
for several problems:

\section{Library for refrigeration systems}

The aim of the modelling is to implement a library with physical based
models of components of refrigeration systems. At the moment the
library enables investigations with two refrigerants (CO$_2$, R134a). But
the realised structure allows the extension of the library by other
refrigerants.

\subsection{ThermoFluid library}

The implemented refrigeration library is based on the free Modelica library ThermoFluid
\cite{eborn}, \cite{tum}, \cite{thermofluid}. The
ThermoFluid library, especially its base classes and partial
components, offers a good base for the modelling of refrigeration systems with
respect to the implementation of the three balance equations and the
method of discretisation. 

\section{Transient simulation of a CO$_2$-system}

In the following, results of the transient simulation of the above mentioned CO$_2$-system are presented.
The results are compared with data of a start up of the
system and following step changes in compressor speed as shown in
Figure \ref{fig5}.

\begin{figure}[h]
%uncomment next line to include a graphic file
%\centerline{\includegraphics[width=6cm, angle=-90]{fig5.eps}}
%and comment out next line
\centerline{\framebox[6cm]{\rule{0cm}{3.5cm} figure example}}
\caption{Step changes in compressor speed and run of air inlet
temperature at the evaporator in the experiment; set as boundary
condition of simulation run}
\label{fig5}
\end{figure}

\begin{thebibliography}{00}
\addcontentsline{toc}{chapter}{References}

\bibitem{eborn} Eborn J. On Model Libraries for Thermo-hydraulic
Applications. Lund, Sweden: PhD thesis, Department of Automatic
control, Lund Institute of Technology, 2001.

\bibitem{tum}Tummescheit H. Design and Implementation of Object-Oriented Model Libraries
using Modelica. Lund, Sweden: PhD thesis, Department of Automatic
control, Lund Institute of Technology, 2002.

\bibitem{thermofluid} Tummescheit H, Eborn J. Chemical Reaction
Modeling with ThermoFluid/MF and MultiFlash. In: Proceedings of the 2th
Modelica Conference 2002, Oberpfaffenhofen, Germany, Modelica
Association, 18-19 March 2002.
\end{thebibliography}


\end{document}

It seems to me this is not the correct way to view the document. Can someone please let me know whether or not I'm right, and if so, how I can view the document properly?

Calysta answered 9/3, 2014 at 16:2 Comment(1)
You can use any of the available LaTeX Editors/IDEs.Diazotize
O
46

A .tex file should be a LaTeX source file.

If this is the case, that file contains the source code for a LaTeX document. You can open it with any text editor (notepad, notepad++ should work) and you can view the source code. But if you want to view the final formatted document, you need to install a LaTeX distribution and compile the .tex file.

Of course, any program can write any file with any extension, so if this is not a LaTeX document, then we can't know what software you need to install to open it. Maybe if you upload the file somewhere and link it in your question we can see the file and provide more help to you.


Yes, this is the source code of a LaTeX document. If you were able to paste it here, then you are already viewing it. If you want to view the compiled document, you need to install a LaTeX distribution. You can try to install MiKTeX then you can use that to compile the document to a .pdf file.

You can also check out this question and answer for how to do it: How to compile a LaTeX document?

Also, there's an online LaTeX editor and you can paste your code in there to preview the document: https://www.overleaf.com/.

Orthohydrogen answered 9/3, 2014 at 16:8 Comment(2)
A tex file in many cases can also be a texture file, which is holding a texture for a game. Which is the sort of answer I expected for a programming forum. Oh well, I suppose I'll have to keep searching.Naturalist
@Orthohydrogen flawless answer! Overleaf is a great site!Demimondaine
T
0

You can either use Notepad++ or Notepad (provided by MS) to view the source code of.tex file. But, if you want to see the entire document in compiled form use "MikeTeX"

Tiddly answered 26/6, 2022 at 7:40 Comment(0)
E
-5

I don't know what the .tex extension on your file means. If we are saying that it is any file with any extension you have several methods of reading it.

I have to assume you are using windows because you have mentioned notepad++.

  1. Use notepad++. Right click on the file and choose "edit with notepad++"

  2. Use notepad Change the filename extension to .txt and double click the file.

  3. Use command prompt. Open the folder that your file is in. Hold down shift and right click. (not on the file, but in the folder that the file is in.) Choose "open command window here" from the command prompt type: "type filename.tex"

If these don't work, I would need more detail as to how they are not working. Errors that you may be getting or what you may expect to be in the file might help.

Eady answered 9/3, 2014 at 16:16 Comment(7)
I'm trying to follow your first instruction. I have Notepad++ open. Your instruction is to right click on the file, but I can't see the file, so how can I right click on it?Calysta
Well. My instruction does not say to open Notepad++. You have to open the folder that the file is in. That may be your desktop. Then right click on the file icon and select "edit with notepad++". Notepad++ should open when you do this. If notepad++ is installed.Eady
I have opened the folder that the file is in both with Notepad and Windows Explorer and right clicked on the file. Neither results in an option to 'edit with notepad++'.Calysta
I can't say that I have ever seen that. Anytime I have installed notepad++ it offers that menu. That may be an option when you install it that I am forgetting about. That doesn't really matter. If your goal is to read this thing, you can still use notepad++. You will need to know how to click the restore button in the upper right corner. That is the one between the "close" and the "minimize". Once you do that you can adjust the size of the notepad++ window and drag the file icon into notepad++. It is possible to have more than one window open by using this method.Eady
George Tomlinson, you already pasted the code in the question. That is what you will see if you open the file with notepad++. Maybe you want to compile the file (view the compiled document). In that case, I have updated my answer to your question. You should check that out.Orthohydrogen
@cherry thanks for your efforts to help me. Ove has 'hit the nail on the head', so the problem's solved now.Calysta
I just noticed that I do get the 'Edit with Notepad++' option when I right-click on files. I don't know if I just didn't notice this option last time, or if something funny was going on. The problem is solved now anyway, but I thought I'd let you know.Calysta

© 2022 - 2024 — McMap. All rights reserved.